package com.example.app.cls

import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.update

open class MyState {
    //显示和隐藏
    var _visible = MutableStateFlow<Boolean>(false)
    var visible = _visible.asStateFlow()
    fun flowUpdate_visible(value: Boolean) {
        _visible.update {
            value
        }
    }
}